package cn.dlc.com.linear;

/**
 * @author 邓立川
 * @date 2021/3/21 10:27
 * @desc 测试代码
 */
public class TwoWayLinkListTest {
    public static void main(String[] args) {
        TwoWayLinkList<String> strs = new TwoWayLinkList<>();

        strs.insert("lucy");
        strs.insert("jack");
        strs.insert("lily");
        strs.insert("james");

        strs.insert(2,"yaoming");

        for (String str : strs) {
            System.out.println(str);
        }

        System.out.println("索引为3的元素是：" +  strs.get(3));

        String remove = strs.remove(1);
        System.out.println("删除的元素是：" + remove);

        for (String str : strs) {
            System.out.println(str);
        }
    }
}
